package com.workflow.workflowproject.entity.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class FlowInfoTableDef extends TableDef {

    public static final FlowInfoTableDef FLOW_INFO = new FlowInfoTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn NO = new QueryColumn(this, "no");

    public final QueryColumn IS_PC = new QueryColumn(this, "is_pc");

    public final QueryColumn NAME = new QueryColumn(this, "name");

    public final QueryColumn TYPE = new QueryColumn(this, "type");

    public final QueryColumn EXIST = new QueryColumn(this, "exist");

    public final QueryColumn IS_MOVE = new QueryColumn(this, "is_move");

    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    /**
     * 修改时间
     */
    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    public final QueryColumn CURRENT_VERSION = new QueryColumn(this, "current_version");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, NO, IS_PC, NAME, TYPE, IS_MOVE, CREATE_TIME, UPDATE_TIME, CURRENT_VERSION};

    public FlowInfoTableDef() {
        super("", "t_com_flow_info");
    }

    private FlowInfoTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public FlowInfoTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new FlowInfoTableDef("", "t_com_flow_info", alias));
    }

}
